package com.common.www.bean.entity.programme;


import org.springframework.boot.base.jpa.domain.annotations.QueryCacheable;
import org.springframework.boot.base.jpa.domain.entity.NumberIdentityEntity;
import com.common.www.bean.entity.auth.AuthUser;
import com.common.www.bean.entity.project.GdyBasic;
import com.common.www.bean.entity.project.Project;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 基础用需
 *
 * @param
 * @author andyliu
 * @date 5/28/2018 4:23 PM
 * @return
 */
@DynamicUpdate(true)
@DynamicInsert(true)
@Entity
@Getter
@Setter
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table()
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "基础用需")
public class BasisDemand extends NumberIdentityEntity {
    /**
     * 对应项目
     */
    @JsonIgnoreProperties(value = {""})
    @ManyToOne()
    private Project project;
    /**
     * 招标方式
     */
    @Column(length = 512)
    private String biddingMode;
    /**
     * 铜不含税基价
     */
    @Column(length = 11, precision = 12, scale = 4)
    private Double tongBhsjj;
    /**
     * 铝不含税基价
     */
    @Column(length = 11, precision = 12, scale = 4)
    private Double lvBhsjj;
    /**
     * 备注
     */
    @Column(columnDefinition = "TEXT")
    private String remarks;

    @Transient
    private BasisDemandDetails demandDetails;
    @Transient
    private GdyBasic gdyBasic;
}